package com.matt.malltinylombok.example;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NonNull;

/**
 * DataExample
 * Created by jiachun.lu on 2025/02/10.
 */
@Data
public class DataExample {
    @NonNull
    private Long id;
    @EqualsAndHashCode.Exclude
    private String name;
    @EqualsAndHashCode.Exclude
    private Integer age;

    public static void main(String[] args) {
        DataExample example = new DataExample(1L);
        example.setName("test");
        System.out.println(example);
        DataExample example2 = new DataExample(1L);
        System.out.println(example.equals(example2));
    }
}
